<!DOCTYPE html>
<html>
<head>
    <title>线充管理</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <!--<div class="grid-btn">
            <#if shiro.hasPermission("sys:linepassword:save")>
            <a class="btn btn-primary col-sm-1" @click="add">&nbsp;添加密码线&nbsp;&nbsp;&nbsp;</a>
        </#if>&nbsp;
        <a class="btn btn-primary" @click="addAll">&nbsp;&nbsp;&nbsp;批量添加密码线</a>&nbsp;
        &lt;!&ndash;<a class="btn btn-primary" id="uploadAdd"><i class="fa fa-trash-o"></i>&nbsp;&nbsp;&nbsp;批量添加密码线</a>&nbsp;&ndash;&gt;
        <a class="btn btn-primary" @click="downFormwork">&nbsp;&nbsp;&nbsp;下载二维码模板</a>
    </div>-->
    <div class="grid-btn">

        <!--<a class="btn btn-primary" @click="addAll"><i class="fa fa-trash-o"></i>&nbsp;批量添加密码线</a>-->
        <!--<#if shiro.hasPermission("sys:linepassword:update")>-->
        <!--<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>-->
        <!--</#if>-->
        <!--<#if shiro.hasPermission("sys:linepassword:delete")>-->
        <!--<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->
        <!--</#if>-->
        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">设备号：</div>
        <div style="float: left;width:160px;margin-right: 10px;">
            <input type="text" class="form-control" v-model="q.devicesn" @keyup.enter="query" placeholder="输入设备号">
        </div>
        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">二维码编号：</div>
        <div style="float: left;width:160px;margin-right: 10px;">
            <input type="text" class="form-control" v-model="q.qcodeid" @keyup.enter="query" placeholder="输入二维码">
        </div>
        <a class="btn btn-primary" @click="query">查询</a>
        <#if shiro.hasPermission("sys:linepassword:delete")>
        <a class="btn btn-primary" @click="del">&nbsp;删除</a>
    </#if>
    </div>
    <div class="grid-btn">

    </div>
    <table id="jqGrid"></table>
    <div id="jqGridPager"></div>

    <!-- 代理商弹窗 -->
    <div class="modal fade" id="myModalCX" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="z-index: 1041" >
            <form class="form-horizontal">
                <div class="modal-content" style="width: 750px;">
                    <div style="padding: 15px;">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                            <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择代理商</p>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div style="margin-bottom: 15px">
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                            <div style="float: left;width:70px;margin-right: 10px;">
                                <select class="form-control" v-model="qcx.status" @keyup.enter="queryAdminCX" id="s_id1cx">
                                    <option value="1">正常</option>
                                    <option value="0">禁止</option>
                                </select>
                            </div>

                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商名称：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qcx.shopName" @keyup.enter="queryAdminCX" placeholder="请输入内容">
                            </div>
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qcx.shopPhone" @keyup.enter="queryAdminCX" placeholder="请输入内容">
                            </div>

                            <a class="btn btn-primary" @click="queryAdminCX">搜索</a>
                        </div>

                        <table id="jqGridAddCX" style="width: 100%;"></table>
                        <div id="jqGridPagerCX"></div>
                        <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                    </div>
                </div>
            </form>
        </div>
    </div>


    <!-- 商户弹窗 -->
    <div class="modal fade" id="myModalMerchant" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="z-index: 1041" >
            <form class="form-horizontal">
                <div class="modal-content" style="width: 870px;">
                    <div style="padding: 15px;">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                            <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择商户</p>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div style="margin-bottom: 15px">

                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">商铺名称：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qcxsh.name" @keyup.enter="queryMerchantCX" placeholder="商铺名称">
                            </div>
                            <!--<div style="float: left;margin-left:10px;height:34px;line-height:34px;">所在区域：</div>-->
                            <!--<div style="float: left;width:120px;margin-right: 10px;">-->
                            <!--<input type="text" class="form-control" v-model="qcx.district" @keyup.enter="queryMerchant" placeholder="请输入内容">-->
                            <!--</div>-->
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">状态：</div>
                            <div style="float: left;width:70px;margin-right: 10px;">
                                <select class="form-control" v-model="qcxsh.status" @keyup.enter="queryMerchantCX" id="s_idshcx">
                                    <option value="0">正常</option>
                                    <option value="1">禁止</option>
                                </select>
                            </div>

                            <a class="btn btn-primary" @click="queryMerchantCX">搜索</a>
                        </div>

                        <table id="jqGridMerchant" style="width: 100%;"></table>
                        <div id="jqGridPagerMerchant"></div>
                        <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                    </div>
                </div>
            </form>
        </div>
    </div>


</div>
<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group" hidden="hidden" id="textInput">
            <div class="col-sm-2 control-label">设备号</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="devicesns" disabled="disable" v-model="linePassword.devicesn" placeholder="设备号"/>
            </div>
        </div>
        <div class="form-group"  hidden="hidden" id="fileInput">
            <div class="col-sm-2 control-label">请选择excel</div>
            <div class="col-sm-10">
                <input type="file" id="files" class="form-control" placeholder="设备号"/>
            </div>
        </div>
        <div class="form-group" id="ssdls" hidden="hidden">
            <div class="col-sm-2 control-label">所属代理商</div>
            <div style="vertical-align: middle;display: table-cell!important;">
                <div id="agentParentXZ" style="float: left" class="col-sm-10">
                    <input type="text" class="form-control" id="agentids" disabled="disable"   placeholder="所属代理商"/>
                </div>
                <div class="col-sm-2">
                    <a class="btn btn-primary"  @click="addAdminXZ">&nbsp;选择</a>
                </div>
            </div>
        </div>
        <div class="form-group" id="ssywy" hidden="hidden">
            <div class="col-sm-2 control-label">所属业务员</div>
            <div style="vertical-align: middle;display: table-cell!important;">
                <div id="saleXZ" style="float: left" class="col-sm-10">
                    <input type="text" class="form-control" id="sales" disabled="disable"   placeholder="所属业务员"/>
                </div>
                <div class="col-sm-2">
                    <a class="btn btn-primary"  @click="addYWY">&nbsp;选择</a>
                </div>
            </div>
        </div>

        <div class="form-group" id="sssh" hidden="hidden">
            <div class="col-sm-2 control-label">所属商户</div>
            <div style="vertical-align: middle;display: table-cell!important;">
                <div id="merchantXZ" style="float: left" class="col-sm-10">
                    <input type="text" class="form-control" id="merchants" disabled="disable"   placeholder="所属商户"/>
                </div>
                <div class="col-sm-2">
                    <a class="btn btn-primary"  @click="addMerchantXZ">&nbsp;选择</a>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" id="btnSaveUpload" hidden="hidden" data-loading-text="批量上传保存中..." @click="saveUpload" value="确定"/>
            <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" hidden="hidden" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>

            <!-- 代理商弹窗 -->
            <div class="modal fade" id="myModalXZ" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <form class="form-horizontal">
                        <div class="modal-content" style="width: 750px;">
                            <div style="padding: 15px;">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                    <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择代理商</p>
                                </div>
                            </div>
                            <div class="modal-body">
                                <div style="margin-bottom: 15px">
                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                                    <div style="float: left;width:70px;margin-right: 10px;">
                                        <select class="form-control" v-model="qxz.status" @keyup.enter="queryAdminXZ" id="s_id1">
                                            <option value="0">正常</option>
                                            <option value="1">禁止</option>
                                        </select>
                                    </div>

                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商名称：</div>
                                    <div style="float: left;width:120px;margin-right: 10px;">
                                        <input type="text" class="form-control" v-model="qxz.shopName" @keyup.enter="queryAdminXZ" placeholder="请输入内容">
                                    </div>
                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                                    <div style="float: left;width:120px;margin-right: 10px;">
                                        <input type="text" class="form-control" v-model="qxz.shopPhone" @keyup.enter="queryAdminXZ" placeholder="请输入内容">
                                    </div>

                                    <a class="btn btn-primary" @click="queryAdminXZ">搜索</a>
                                </div>

                                <table id="jqGridAddXZ" style="width: 100%;"></table>
                                <div id="jqGridPagerXZ" style="width: 100%;"></div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

            <!-- 业务员弹窗 -->
            <div class="modal fade" id="myModalYWY" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <form class="form-horizontal">
                        <div class="modal-content" style="width: 750px;">
                            <div style="padding: 15px;">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                    <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择业务员</p>
                                </div>
                            </div>
                            <div class="modal-body">
                                <div style="margin-bottom: 15px">

                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">业务员名称：</div>
                                    <div style="float: left;width:120px;margin-right: 10px;">
                                        <input type="text" class="form-control" v-model="ywyxz.shopName" @keyup.enter="queryAdminXZ" placeholder="请输入内容">
                                    </div>
                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                                    <div style="float: left;width:120px;margin-right: 10px;">
                                        <input type="text" class="form-control" v-model="ywyxz.shopPhone" @keyup.enter="queryAdminXZ" placeholder="请输入内容">
                                    </div>

                                    <a class="btn btn-primary" @click="querySaleXZ">搜索</a>
                                </div>

                                <table id="jqGridAddYWY" style="width: 100%;"></table>
                                <div id="jqGridPagerYWY" style="width: 100%;"></div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

            <!-- 商户弹窗 -->
            <div class="modal fade" id="myModalMerchantXZ" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <form class="form-horizontal">
                        <div class="modal-content" style="width: 870px;">
                            <div style="padding: 15px;">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                    <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择商户</p>
                                </div>
                            </div>
                            <div class="modal-body">
                                <div style="margin-bottom: 15px">

                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">商铺名称：</div>
                                    <div style="float: left;width:120px;margin-right: 10px;">
                                        <input type="text" class="form-control" v-model="qcxshxz.name" @keyup.enter="queryMerchantXZ" placeholder="商铺名称">
                                    </div>

                                    <div style="float: left;margin-left:10px;height:34px;line-height:34px;">商铺地址：</div>
                                    <div style="float: left;width:70px;margin-right: 10px;">
                                        <input type="text" class="form-control" v-model="qcxshxz.address" @keyup.enter="queryMerchantXZ" placeholder="商铺地址">
                                    </div>

                                    <a class="btn btn-primary" @click="queryMerchantXZ">搜索</a>
                                </div>

                                <table id="jqGridMerchantXZ" style="width: 100%;"></table>
                                <div id="jqGridPagerMerchantXZ" style="width: 100%;"></div>
                                <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </form>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/linepassword.js?_${.now?long}"></script>
</body>
</html>
